using System;
using System.ComponentModel;
using System.Xml.Serialization;

namespace com.exceptionalsoftware.spacetime.KML
{
	[Serializable()]
    [XmlType(TypeName = "ChangeType")]
    public class Change
	{
        private ObjectType[] itemsField;

        private ItemsChoice[] itemsElementNameField;

        /// <remarks/>
        [XmlElement(ElementName = "BalloonStyle", Type = typeof(BalloonStyle))]
        [XmlElement(ElementName = "Document", Type = typeof(Document))]
        [XmlElement(ElementName = "Feature", Type = typeof(Feature))]
        [XmlElement(ElementName = "Folder", Type = typeof(Folder))]
        [XmlElement(ElementName = "Geometry", Type = typeof(Geometry))]
        [XmlElement(ElementName = "GroundOverlay", Type = typeof(GroundOverlay))]
        [XmlElement(ElementName = "Icon", Type = typeof(Icon))]
        [XmlElement(ElementName = "IconStyle", Type = typeof(IconStyle))]
        [XmlElement(ElementName = "LatLonBox", Type = typeof(LatLonBox))]
        [XmlElement(ElementName = "LineString", Type = typeof(LineString))]
        [XmlElement(ElementName = "LabelStyle", Type = typeof(LabelStyle))]
        [XmlElement(ElementName = "LineStyle", Type = typeof(LineStyle))]
        [XmlElement(ElementName = "LinearRing", Type = typeof(LinearRing))]
        [XmlElement(ElementName = "Link", Type = typeof(Link))]
        [XmlElement(ElementName = "ListStyle", Type = typeof(ListStyle))]
        [XmlElement(ElementName = "Location", Type = typeof(Location))]
        [XmlElement(ElementName = "Lod", Type = typeof(LevelOfDetail))]
        [XmlElement(ElementName = "LookAt", Type = typeof(LookAtType))]
        [XmlElement(ElementName = "Model", Type = typeof(Model))]
        [XmlElement(ElementName = "MultiGeometry", Type = typeof(MultiGeometry))]
        [XmlElement(ElementName = "NetworkLink", Type = typeof(NetworkLink))]
        [XmlElement(ElementName = "Object", Type = typeof(ObjectType))]
        [XmlElement(ElementName = "Orientation", Type = typeof(Orientation))]
        [XmlElement(ElementName = "Placemark", Type = typeof(Placemark))]
        [XmlElement(ElementName = "Point", Type = typeof(Point))]
        [XmlElement(ElementName = "PolyStyle", Type = typeof(PolyStyle))]
        [XmlElement(ElementName = "Polygon", Type = typeof(Polygon))]
        [XmlElement(ElementName = "Region", Type = typeof(Region))]
        [XmlElement(ElementName = "Scale", Type = typeof(Scale))]
        [XmlElement(ElementName = "ScreenOverlay", Type = typeof(ScreenOverlay))]
        [XmlElement(ElementName = "Style", Type = typeof(Style))]
        [XmlElement(ElementName = "StyleMap", Type = typeof(StyleMap))]
        [XmlElement(ElementName = "StyleSelector", Type = typeof(StyleSelector))]
        [XmlElement(ElementName = "TimePrimitive", Type = typeof(TimePrimitive))]
        [XmlElement(ElementName = "TimeSpan", Type = typeof(TimeSpan))]
        [XmlElement(ElementName = "TimeStamp", Type = typeof(TimeStamp))]
        [XmlChoiceIdentifier(MemberName = "ItemsElementName")]
        public ObjectType[] Items
        {
            get { return this.itemsField; }
            set { this.itemsField = value; }
        }

        [XmlElement(ElementName = "ItemsElementName", Type = typeof(ItemsChoice))]
        [XmlIgnore()]
        public ItemsChoice[] ItemsElementName
        {
            get
            {
                return this.itemsElementNameField;
            }
            set
            {
                this.itemsElementNameField = value;
            }
        }
    }

    [Serializable()]
    [XmlType(TypeName = "ItemsChoiceType")]
    public enum ItemsChoice
    {
        [XmlEnum(Name = "BalloonStyle")]
        BalloonStyle,

        [XmlEnum(Name = "Document")]
        Document,

        [XmlEnum(Name = "Feature")]
        Feature,

        [XmlEnum(Name = "Folder")]
        Folder,

        [XmlEnum(Name = "Geometry")]
        Geometry,

        [XmlEnum(Name = "GroundOverlay")]
        GroundOverlay,

        [XmlEnum(Name = "Icon")]
        Icon,

        [XmlEnum(Name = "IconStyle")]
        IconStyle,

        [XmlEnum(Name = "LabelStyle")]
        LabelStyle,

        [XmlEnum(Name = "LatLonBox")]
        LatLonBox,

        [XmlEnum(Name = "LineString")]
        LineString,

        [XmlEnum(Name = "LineStyle")]
        LineStyle,

        [XmlEnum(Name = "LinearRing")]
        LinearRing,

        [XmlEnum(Name = "Link")]
        Link,

        [XmlEnum(Name = "ListStyle")]
        ListStyle,

        [XmlEnum(Name = "Location")]
        Location,

        [XmlEnum(Name = "Lod")]
        Lod,

        [XmlEnum(Name = "LookAt")]
        LookAt,

        [XmlEnum(Name = "Model")]
        Model,

        [XmlEnum(Name = "MultiGeometry")]
        MultiGeometry,

        [XmlEnum(Name = "NetworkLink")]
        NetworkLink,

        [XmlEnum(Name = "Object")]
        Object,

        [XmlEnum(Name = "Orientation")]
        Orientation,

        [XmlEnum(Name = "Placemark")]
        Placemark,

        [XmlEnum(Name = "Point")]
        Point,

        [XmlEnum(Name = "PolyStyle")]
        PolyStyle,

        [XmlEnum(Name = "Polygon")]
        Polygon,

        [XmlEnum(Name = "Region")]
        Region,

        [XmlEnum(Name = "Scale")]
        Scale,

        [XmlEnum(Name = "ScreenOverlay")]
        ScreenOverlay,

        [XmlEnum(Name = "Style")]
        Style,

        [XmlEnum(Name = "StyleMap")]
        StyleMap,

        [XmlEnum(Name = "StyleSelector")]
        StyleSelector,

        [XmlEnum(Name = "TimePrimitive")]
        TimePrimitive,

        [XmlEnum(Name = "TimeSpan")]
        TimeSpan,

        [XmlEnum(Name = "TimeStamp")]
        TimeStamp,
    }
}